Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing /
Chapter 2 - Core Printing Features / Core Printing Features Reference
Application-Defined Functions / Flattening and Unflattening Functions for Job Objects


MyUnflattenFunction

To retrieve a job object when a document is opened, you can call the GXUnflattenJob function and provide a pointer to the application-supplied unflattening function you want to use. The application-supplied function must match the following declaration. For example, this is how you should declare the function if you were to name it MyUnflattenFunction:

OSErr MyUnflattenFunction (long size, void *data, void *refCon);
size
The size of the segment (in bytes) to read.
data
A pointer to job object data to unflatten.
refCon
A pointer to a reference constant for application-specific information.
function result
An error code of type OSErr.
DESCRIPTION
When you use the GXUnflattenJob function, QuickDraw GX calls your unflattening function multiple times as the unflattening function retrieves the job object data from disk. It continues to call your function until the entire job object is retrieved. You can use the refCon parameter to hold the file reference number of the file containing the data to unflatten. You can return any OSErr value.

SEE ALSO
Listing 2-11 on page 2-32 shows how to use an unflattening function.

The GXUnflattenJob function is described on page 2-59.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help